package contest;

import java.io.*;
import java.text.*;

public class SimultaneousEquation {
	public static void main(String args[]) throws NumberFormatException, IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String line =br.readLine();
			if(line == null)break;
			double[] num = new double[6];
			int number = 0;
			for(int i=0;i<5;i++){
				num[i] = new Double(line.substring(number,line.indexOf(" ", number)));
				number = line.indexOf(" ", number)+1;
			}
			num[5] = new Double(line.substring(number,line.length()));
			double valuex = (num[2] * num[4] - num[5] * num[1])/(num[0] * num[4] - num[3] * num[1]);
			double valuey = (num[2] * num[3] - num[5] * num[0])/(num[1] * num[3] - num[4] * num[0]);
			if(valuex >= 0.0)valuex = Math.floor(valuex*1000.0+0.5)/1000.0;
			else valuex = Math.ceil(valuex*1000.0-0.5)/1000.0;
			if(valuey >= 0.0)valuey = Math.floor(valuey*1000.0+0.5)/1000.0;
			else valuey = Math.ceil(valuey*1000.0-0.5)/1000.0;
			DecimalFormat dc = new DecimalFormat();
			dc.setMaximumFractionDigits(3);
			dc.setMinimumFractionDigits(3);
			
			System.out.println(dc.format(valuex)+" "+dc.format(valuey));
		}
	}
}
